

HW.App.controller('MainCtrl', function($scope, TemplateFactory, FirstCategoryFactory){
    $scope.city = HW.user.currentCity;

    //设置banner数据
    HW.request.getCommonBannerData({type:'home'}, function(data){
        $scope.banner = data;
    });

    //设置大分类数据
    FirstCategoryFactory.getHomeSlideBoxData(function(data){
        $scope.homeFirstCategory = data;
    });

    //设置生活服务部分数据
    FirstCategoryFactory.getHomeSubCategoryData(function(data){
        $scope.lifeService = data;
    });

    $scope.tpl = TemplateFactory;

    util.log('MainCtrl init end');
});


